package bb.lanxing.lib.devices.api;

import java.util.List;

public interface DeviceManager {
    int ERROR_NONE = 0;
    int PROTOCOL_BLE = 1;
    int PROTOCOL_ANT_PLUS = 2;

    int STATE_CONNECTING = 1;
    int STATE_CONNECTED = 2;
    int STATE_DISCONNECTING = 3;
    int STATE_DISCONNECTED = 4;

    void connect(SmartDevice smartDevice);

    void disconnect(int i);

    void disconnect(String str);

    void disconnectAll();

    PeerDevice getDevice(int i, int i2);

    PeerDevice getDevice(String str);

    int getDeviceState(String str);

    List<PeerDevice> getDevices(int i, int i2);

    String getWorkDir(int i);

    boolean isConnected(int deviceType);

    boolean isConnected(String deviceAddress);

    boolean isConnecting(String str);

    void registerConnectionStateListener(ConnectionListener connectionListener);

    void registerDeviceStateListener(DeviceStateListener deviceStateListener);

    void release();

    void removeDeviceByAddress(String str);

    void startAndRefreshAutoConnector();

    void stopAutoConnector();

    void unregisterConnectionStateListener(ConnectionListener connectionListener);

    void unregisterDeviceStateListener(DeviceStateListener deviceStateListener);
}
